package com.shrct.businessprocess.product.events;

import com.shrct.businessprocess.product.RCAnonymousProductEntry;
import com.shrct.businessprocess.product.RCAnonymouseProductEntryRoot;
import com.shrct.businessprocess.product.events.RCAnonymouseProductEntryRootEventsListener;
import com.shrct.businessprocess.purchase.RCPurchaseOrderItem;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.product.events.RCAnonymouseProductEntryRootEventsManager")
public class RCAnonymouseProductEntryRootEventsManager extends EntityEventsManager<RCAnonymouseProductEntryRoot> {
  @Autowired(required = false)
  private Collection<RCAnonymouseProductEntryRootEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<RCAnonymouseProductEntryRootEventsListener> getListeners() {
    return listeners;
  }
  
  public void fire_inStock(final RCAnonymouseProductEntryRoot entity, final RCPurchaseOrderItem orderItem, final Integer quantity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCAnonymouseProductEntryRootEventsListener)listener)._inStock(entity,orderItem,quantity);
    }
    
  }
  
  public void fire_deliver(final RCAnonymouseProductEntryRoot entity, final RCAnonymousProductEntry target, final Integer quantity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCAnonymouseProductEntryRootEventsListener)listener)._deliver(entity,target,quantity);
    }
    
  }
  
  public void fire_return(final RCAnonymouseProductEntryRoot entity, final RCAnonymousProductEntry source, final Integer quantity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCAnonymouseProductEntryRootEventsListener)listener)._return(entity,source,quantity);
    }
    
  }
}
